package com.dragon.modules.yuegou.query.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.act.AnnualRaffleEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 年会抽奖 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-01-14 20:07:54
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class AnnualRaffleQuery extends AnnualRaffleEntity implements Query<AnnualRaffleEntity> {


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 手机号查询条件 */
	@JsonUnwrapped(prefix = "mobile")
	private Condition<String> mobileCondition;

    /** 真实姓名查询条件 */
	@JsonUnwrapped(prefix = "realName")
	private Condition<String> realNameCondition;

    /** 座位查询条件 */
	@JsonUnwrapped(prefix = "seat")
	private Condition<String> seatCondition;

    /** 就餐位置查询条件 */
	@JsonUnwrapped(prefix = "diningLocation")
	private Condition<String> diningLocationCondition;

    /** 是否为领导 0-不是;1-是查询条件 */
	@JsonUnwrapped(prefix = "isLeader")
	private Condition<Boolean> isLeaderCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public AnnualRaffleQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public AnnualRaffleQuery(AnnualRaffleEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public AnnualRaffleQuery(AnnualRaffleQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.mobileCondition != null) {
			this.mobileCondition = other.mobileCondition.copy();
		}
		if(other.realNameCondition != null) {
			this.realNameCondition = other.realNameCondition.copy();
		}
		if(other.seatCondition != null) {
			this.seatCondition = other.seatCondition.copy();
		}
		if(other.diningLocationCondition != null) {
			this.diningLocationCondition = other.diningLocationCondition.copy();
		}
		if(other.isLeaderCondition != null) {
			this.isLeaderCondition = other.isLeaderCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<AnnualRaffleEntity> toQueryWrapper() {
		QueryWrapper<AnnualRaffleEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (mobileCondition != null) {
			mobileCondition.toWrapper(wrapper, COL_MOBILE);
		}
		if (realNameCondition != null) {
			realNameCondition.toWrapper(wrapper, COL_REAL_NAME);
		}
		if (seatCondition != null) {
			seatCondition.toWrapper(wrapper, COL_SEAT);
		}
		if (diningLocationCondition != null) {
			diningLocationCondition.toWrapper(wrapper, COL_DINING_LOCATION);
		}
		if (isLeaderCondition != null) {
			isLeaderCondition.toWrapper(wrapper, COL_IS_LEADER);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回手机号查询条件
	 * 
	 * @return mobileCondition 手机号查询条件
	 */
	public Condition<String> mobile() {
		this.mobileCondition = new Condition<>();
		return this.mobileCondition;
	}
	
	/**
	 * 获取手机号查询条件
	 * 
	 * @return mobileCondition 手机号查询条件
	 */
	public Condition<String> getMobileCondition() {
		return mobileCondition;
	}

	/**
	 * 设置手机号查询条件
	 * 
	 * @param mobileCondition 手机号查询条件
	 */
	public void setMobileCondition(Condition<String> mobileCondition) {
		this.mobileCondition = mobileCondition;
	}

	/**
	 * 构造并返回真实姓名查询条件
	 * 
	 * @return realNameCondition 真实姓名查询条件
	 */
	public Condition<String> realName() {
		this.realNameCondition = new Condition<>();
		return this.realNameCondition;
	}
	
	/**
	 * 获取真实姓名查询条件
	 * 
	 * @return realNameCondition 真实姓名查询条件
	 */
	public Condition<String> getRealNameCondition() {
		return realNameCondition;
	}

	/**
	 * 设置真实姓名查询条件
	 * 
	 * @param realNameCondition 真实姓名查询条件
	 */
	public void setRealNameCondition(Condition<String> realNameCondition) {
		this.realNameCondition = realNameCondition;
	}

	/**
	 * 构造并返回座位查询条件
	 * 
	 * @return seatCondition 座位查询条件
	 */
	public Condition<String> seat() {
		this.seatCondition = new Condition<>();
		return this.seatCondition;
	}
	
	/**
	 * 获取座位查询条件
	 * 
	 * @return seatCondition 座位查询条件
	 */
	public Condition<String> getSeatCondition() {
		return seatCondition;
	}

	/**
	 * 设置座位查询条件
	 * 
	 * @param seatCondition 座位查询条件
	 */
	public void setSeatCondition(Condition<String> seatCondition) {
		this.seatCondition = seatCondition;
	}

	/**
	 * 构造并返回就餐位置查询条件
	 * 
	 * @return diningLocationCondition 就餐位置查询条件
	 */
	public Condition<String> diningLocation() {
		this.diningLocationCondition = new Condition<>();
		return this.diningLocationCondition;
	}
	
	/**
	 * 获取就餐位置查询条件
	 * 
	 * @return diningLocationCondition 就餐位置查询条件
	 */
	public Condition<String> getDiningLocationCondition() {
		return diningLocationCondition;
	}

	/**
	 * 设置就餐位置查询条件
	 * 
	 * @param diningLocationCondition 就餐位置查询条件
	 */
	public void setDiningLocationCondition(Condition<String> diningLocationCondition) {
		this.diningLocationCondition = diningLocationCondition;
	}

	/**
	 * 构造并返回是否为领导 0-不是;1-是查询条件
	 * 
	 * @return isLeaderCondition 是否为领导 0-不是;1-是查询条件
	 */
	public Condition<Boolean> isLeader() {
		this.isLeaderCondition = new Condition<>();
		return this.isLeaderCondition;
	}
	
	/**
	 * 获取是否为领导 0-不是;1-是查询条件
	 * 
	 * @return isLeaderCondition 是否为领导 0-不是;1-是查询条件
	 */
	public Condition<Boolean> getIsLeaderCondition() {
		return isLeaderCondition;
	}

	/**
	 * 设置是否为领导 0-不是;1-是查询条件
	 * 
	 * @param isLeaderCondition 是否为领导 0-不是;1-是查询条件
	 */
	public void setIsLeaderCondition(Condition<Boolean> isLeaderCondition) {
		this.isLeaderCondition = isLeaderCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
